cmake_minimum_required(VERSION 3.23)
#set(-DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_CUDA_COMPILER=“/usr/local/cuda/bin/nvcc”)
set(PROJECT_NAME hello)
if (MSVC)
    # 设置 msvc 输入代码编码格式为 utf-8
    set(CMAKE_C_FLAGS /source-charset:utf-8)
endif()
project(${PROJECT_NAME} LANGUAGES CXX CUDA)

include_directories(include)
#set(CMAKE_CUDA_COMPILER C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/bin/nvcc.exe)
add_executable(${PROJECT_NAME} include/he.cu main.cpp)
if(MSVC)
	# 自定义编译规则
	set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
endif()
message(STATUS "CUDA --------------")
